GtkHeaderBar: Fix allocation of start and end boxes
authorMatthias Clasen <mclasen@redhat.com>
Tue, 17 Dec 2013 01:36:22 +0000 (20:36 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 17 Dec 2013 01:36:22 +0000 (20:36 -0500)
We were giving these boxes too much width, consuming what
was supposed to be the spacing between the boxes and the
other content of the header bar.

gtk/gtkheaderbar.c

index e0a35b61aa9e3aa3878f906c806b9227a5870938..3b49cb0033028e3eada5430c46ec1635acadb5af 100644 (file)
@@ -1107,8 +1107,8 @@ gtk_header_bar_size_allocate (GtkWidget     *widget,
       if (left)
         child_allocation.x = allocation->x + css_borders.left;
       else
-        child_allocation.x = allocation->x + allocation->width - css_borders.right - start_width;
-      child_allocation.width = start_width;
+        child_allocation.x = allocation->x + allocation->width - css_borders.right - start_width + priv->spacing;
+      child_allocation.width = start_width - priv->spacing;
       gtk_widget_size_allocate (priv->titlebar_start_box, &child_allocation);
     }
 
@@ -1118,8 +1118,8 @@ gtk_header_bar_size_allocate (GtkWidget     *widget,
       if (left)
         child_allocation.x = allocation->x + css_borders.left;
       else
-        child_allocation.x = allocation->x + allocation->width - css_borders.right - end_width;
-      child_allocation.width = end_width;
+        child_allocation.x = allocation->x + allocation->width - css_borders.right - end_width + priv->spacing;
+      child_allocation.width = end_width - priv->spacing;
       gtk_widget_size_allocate (priv->titlebar_end_box, &child_allocation);
     }
 }